# -*-coding:utf-8 -*-
import requests
import json


def require_dislike(video_id):
    '''
    Get the number of dislike for a certain video
    :param video_id:viodeo_id (av number) for the target video
    :return dislike_num: the number of dislike of the video
    '''
    URL_VIDinfo = "http://api.bilibili.com/archive_stat/stat?aid="
    PARAMS = {"aid": video_id}
    VID_info = requests.get(url=URL_VIDinfo, params=PARAMS).json()
    dislike_num = VID_info['data']["dislike"]
    return dislike_num


def main():
    reslut = require_dislike(971465439)
    print('差评数量:'+str(reslut))


if __name__ == "__main__":
    main()